home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / misc_pto / ctshl114 / ctshell.doc < prev    next >
Text File  |  1990-10-19  |  30KB  |  504 lines

  1.  
  2.  
  3.      ──────────────────────────────────────────────────────────────────────
  4.        C T S H E L L . D O C  v1.14                          Oct 19, 1990
  5.      ──────────────────────────────────────────────────────────────────────
  6.  
  7.  
  8.  
  9.      PURPOSE             CTSHELL is a directory manager and a program
  10.                          launcher.  It was designed to be used in
  11.                          programming classes that its author teaches, to
  12.                          make it simple for students to get to the right
  13.                          place to work on a lab assignment.  Its utility is
  14.                          not limited to the classroom, however.  It can be
  15.                          used for day-to-day computing, including program
  16.                          development, communication, and more.
  17.  
  18.                          IT DOESN'T...  Something that CTSHELL *doesn't do*
  19.                          is even more important than what it does──CTSHELL
  20.                          doesn't get in your way!  When you're using
  21.                          CTSHELL, you can type DOS commands just as if you
  22.                          were out at the ordinary DOS prompt.  You can take
  23.                          advantage of everything CTSHELL has to offer
  24.                          without giving up much of anything in exchange.
  25.  
  26.                          XMS/EMS/DISK SWAPPING.  In fact, CTSHELL uses a
  27.                          sophisticated swapping method that lets it take
  28.                          full advantage of your EMS or XMS memory, and it
  29.                          swaps to disk on computers that have neither.
  30.                          That means all but a few K of your available RAM
  31.                          is free to run big programs from CTSHELL.
  32.  
  33.  
  34.  
  35.      OFF TO A            You can get a quick idea what CTSHELL is all about
  36.      QUICK START         by starting it up in a directory that has a
  37.                          configuration file for it (more about the .CFG
  38.                          file later...).  If you've unZipped the original
  39.                          archive in a temporary directory, go ahead and
  40.                          start the program with the command,
  41.  
  42.                                    C:\>  CTSHELL
  43.  
  44.                          MOVING AROUND.  You can move around the listing of
  45.                          files with the up and down arrow keys, and the
  46.                          left and right arrow keys will provide access to
  47.                          the menus at the top of the screen.
  48.  
  49.                          FILE TAGGING.  Tagging is provided by the first
  50.                          four function keys, as the little reminder window
  51.                          shows you, and there are almost as many operations
  52.                          that can be performed on tagged files as there are
  53.                          for individual ones.
  54.  
  55.                          DIRECT DOS COMMANDS.  Notice that you can enter a
  56.                          command normally. You can even change drives or do
  57.                          a CD command to a different directory, and CTSHELL
  58.                          will realize what you did. It will automatically
  59.                          update its screen for the new directory.
  60.                               If you perform any operation that changes
  61.                          information on the current screen, CTSHELL will
  62.                          sense that automatically and update the screen.
  63.                          Later sections of this document provide greater
  64.                          insight into CTSHELL's capabilities. You'll surely
  65.                          want to modify the CTSHELL.CFG file to customize
  66.                          it according to your own needs and tastes.
  67.  
  68.  
  69.     MODIFYING             ┌──────────────────────────────────────────────┐
  70.     CTSHELL.CFG           │ Note:  This overview is kept brief, because  │
  71.                           │ nearly all you need to know about modifying  │
  72.                           │ CTSHELL.CFG is explained in the file itself. │
  73.                           │ It is suggested that you print or display a  │
  74.                           │ copy of that file while you look this over.  │
  75.                           └──────────────────────────────────────────────┘
  76.  
  77.                          CTSHELL is a very configurable program, and relies
  78.                          heavily on the entries that you make in
  79.                          CTSHELL.CFG.  The copy that you started with has
  80.                          some suggested entries (including a set of colors
  81.                          that I personally like).  Use the comments in the
  82.                          file to guide you in setting it up as you like.
  83.  
  84.                          BRACKETS AND BRACES.  Note that all the entries
  85.                          that are meaningful to CTSHELL are enclosed inside
  86.                          braces or brackets. Thus, everything outside those
  87.                          symbols is considered to be comments.  Words
  88.                          inside brackets, such as [colors] tell CTSHELL
  89.                          where the major sections of the config file are,
  90.                          and entries inside braces, such as {program.exe}
  91.                          provide the values and settings that it needs.
  92.  
  93.                          MULTIPLE CONFIGS.  CTSHELL is designed to read a
  94.                          configuration file name from the command line when
  95.                          it is started, and to use the configuration path
  96.                          pointed at by the CTSHELL environment variable if
  97.                          no configuration file name is given at startup.
  98.                          If it *still* doesn't have a file name to use, it
  99.                          will default to CTSHELL.CFG in the current
  100.                          directory.
  101.                               That means that CTSHELL may always be started
  102.                          so that it uses your choice of config files.  You
  103.                          may want to create one specially for use in
  104.                          program development, another one especially for
  105.                          communications, another for word processing, etc.
  106.                               You might want to set up different config
  107.                          files for different people who use a computer.
  108.                          Each user could have his or her own paths and
  109.                          programs easily available.
  110.                               However, most users will probably find it
  111.                          convenient to use a single copy of CTSHELL.CFG
  112.                          that is described by the CTSHELL environment
  113.                          variable.  You can set this environment variable
  114.                          in your AUTOEXEC.BAT file with a statement like
  115.                          this:
  116.  
  117.                               SET  CTSHELL=C:\pathname\filename.ext
  118.  
  119.                          For example, if the configuration file were kept
  120.                          in the C:\BIN directory, and named CTSHELL.CFG,
  121.                          that SET command might look like this:
  122.  
  123.                               SET  CTSHELL=C:\BIN\CTSHELL.CFG
  124.  
  125.                          The program could then be started from anywhere
  126.                          and it would load its configuration properly from
  127.                          the specified file.
  128.  
  129.                          COLOR OPTIONS.  The first nine entries in the
  130.                          configuration file are for color choices. CTSHELL
  131.                          uses your specifications for the colors displayed
  132.                          on the screen.  All colors are given in
  133.                          hexadecimal numbers, with the first (higher) digit
  134.                          specifying the background, and the second (lower)
  135.                          digit specifying the foreground.
  136.                               On all color monitors more recent than CGA,
  137.                          CTSHELL can use all 16 colors in both the
  138.                          background and the foreground.  With CGA monitors,
  139.                          you can use the 8 ordinary colors in both the
  140.                          background and foreground, and the bright colors
  141.                          only in the foreground.
  142.  
  143.                              Digit     Color       Digit     Color
  144.                           ──────────────────────────────────────────────
  145.                                0       Black         8    Bright Black
  146.                                1       Blue          9    Bright Blue
  147.                                2       Green         A    Bright Green
  148.                                3       Cyan          B    Bright Cyan
  149.                                4       Red           C    Bright Red
  150.                                5       Magenta       D    Bright Magenta
  151.                                6       Yellow        E    Bright Yellow
  152.                                7       White         F    Bright White
  153.  
  154.  
  155.                          POINT-'n'-SHOOT PROGRAMS.  The next series of
  156.                          entries tell CTSHELL what programs you use for
  157.                          day-to-day activities.  There are several that are
  158.                          so commonly used that we can assign values to them
  159.                          and put them into a menu for easy access.
  160.                               Everyone uses an editor, for example.  Most
  161.                          all programmers use at least one compiler and a
  162.                          MAKE utility. This Point-'n'-Shoot section
  163.                          establishes what those programs will be.  One
  164.                          thing they all have in common is that they all use
  165.                          the current (or tagged) file(s) as a command-line
  166.                          argument automatically.
  167.                               As the comments in the CTSHELL.CFG file show,
  168.                          you can provide a directory to change to and/or a
  169.                          program to run.  Either may be empty.  Note that
  170.                          CTSHELL calls your default command processor, the
  171.                          one that your COMSPEC environment variable
  172.                          defines.  Thus, if you are using a command
  173.                          processor like 4DOS that provides aliases, you may
  174.                          feel free to use those aliases as commands in your
  175.                          CTSHELL.CFG file.
  176.                               If you need to provide a runtime parameter
  177.                          for your program, you may use a switch option
  178.                          like:
  179.                                      {ASK:ZIP File Name?}
  180.  
  181.                          That will cause CTSHELL to pause before executing
  182.                          the program to prompt you for a "ZIP File Name".
  183.  
  184.                          DIRECTORIES/TASKS.  Following the color settings
  185.                          and program assignments, you can provide up to 20
  186.                          entries that specify tasks you want to be able to
  187.                          pick out of a menu.  Each set of entries describes
  188.                          what you would like to show up in the menu, where
  189.                          to go before starting the task, and what program
  190.                          to run once you get there, as well as some flags
  191.                          and options.
  192.                               If you want to change to a directory but not
  193.                          execute a program once you get there, just leave
  194.                          the brackets for the program name empty.  If you
  195.                          want to execute a program without first changing
  196.                          to another location, leave the brackets for the
  197.                          path name empty.  That will satisfy CTSHELL's need
  198.                          to see an entry, but also will let it know not to
  199.                          take any action.
  200.                               If you need prompted for an optional switch,
  201.                          you may use {ASK: ... } in this section as well.
  202.  
  203.  
  204.  
  205.     TAKING A             Once you have CTSHELL.CFG modified appropriately,
  206.     SECOND LOOK          you're ready to try out everything it has to
  207.                          offer.  Notice that you can move up and down
  208.                          through the listed file names with the up and down
  209.                          arrow keys.  Touch-typists may appreciate that
  210.                          <Ctrl-E> duplicates the up arrow, and <Ctrl-X>
  211.                          duplicates the down arrow.
  212.  
  213.                          DOS OPERATIONS.  CTSHELL improves on many common
  214.                          DOS operations.  Its File Move function moves
  215.                          directory information without copying and deleting
  216.                          the file contents, so long as the source and
  217.                          destination are on the same drive.  If they are on
  218.                          different drives, it copies, then deletes the
  219.                          source.
  220.                               CTSHELL's File Copy function dynamically
  221.                          allocates a copy buffer the same size as the file
  222.                          being copied, provided there's room in the data
  223.                          segment.  Thus, CTSHELL copies large files in
  224.                          approximately 40K chunks, instead of DOS's default
  225.                          4K size.
  226.                               CTSHELL displays files in lowercase letters,
  227.                          as is the default for 4DOS, instead of the
  228.                          uppercase that DOS uses in its DIR listings.
  229.                          Directory names are displayed in uppercase.
  230.                               CTSHELL contains its own DOS critical error
  231.                          handler, so its display is not disrupted by
  232.                          the occasional "Abort, Retry, Ignore" that
  233.                          may happen when you try to access an empty
  234.                          floppy drive. You're given a chance to fix
  235.                          the problem and continue, or exit back to DOS
  236.                          to handle it there.
  237.  
  238.                          PRESSING <ENTER>.  If you press <Enter> while on a
  239.                          file, one of a number of things might happen:
  240.  
  241.                               (1)  if it is a .COM, .EXE, or .BAT file it
  242.                                    will be executed,
  243.  
  244.                               (2)  if it is a file for which one of your
  245.                                    Point-'n'-Shoot programs has reserved
  246.                                    the extension, that program (such as an
  247.                                    editor) will be started up using it as
  248.                                    an argument,
  249.  
  250.                               (3)  otherwise, if it is a directory, CTSHELL
  251.                                    will change to that directory for you.
  252.                                    Note that the special name .. represents
  253.                                    the parent of the current directory.
  254.  
  255.                          THE DELETE KEY.  Because it often happens that we
  256.                          need to delete a single file, CTSHELL uses the
  257.                          <Del> key to delete the current file (the one that
  258.                          the cursor bar is currently highlighting).  So
  259.                          that a file is not deleted accidentally, CTSHELL
  260.                          will beep and ask you to press the key a second
  261.                          time.  Pressing any key other than <Del> for the
  262.                          confirmation aborts the deletion.
  263.  
  264.                          TAGGING FILES.  If you begin tagging files, you'll
  265.                          see that the number of bytes that are tagged is
  266.                          displayed on a special little pop-up.  As more
  267.                          files are tagged or untagged, this is adjusted.
  268.                          When no files are tagged, the pop-up disappears.
  269.                               The first five function keys can be used to
  270.                          toggle the tag condition for a single file, tag
  271.                          all the files, untag all the files, invert the
  272.                          tags, and tag files by name.  You can tag all the
  273.                          source files, copy them to a floppy disk, then
  274.                          invert the tags and copy all the others somewhere
  275.                          else.
  276.  
  277.                          USING THE MOUSE.  The mouse can be used to access
  278.                          the menus in the customary way, and it has various
  279.                          effects elsewhere on the screen.  For example, the
  280.                          scroll bar on the right can be used with the mouse
  281.                          to scroll through the list of files in the manner
  282.                          that has become conventional.
  283.                               There is a list of the function keys that are
  284.                          implemented in CTSHELL.  Clicking on an item from
  285.                          that list has the same effect as pressing the
  286.                          respective function key.
  287.                               Clicking the left button once on a file entry
  288.                          makes that the current file.  If you double-click
  289.                          on a file entry, it means the same thing as
  290.                          pressing <Enter> for that file (see above).  If
  291.                          you click the right button on a file entry, it
  292.                          will tag or untag that file.
  293.  
  294.                          THE ALT KEY.  You might expect that the <Alt> key,
  295.                          when used with a letter that begins a menu name,
  296.                          might open that menu as well.  It does.  If you've
  297.                          opened an menu and decide not to do anything with
  298.                          it, press <Esc> to close it.
  299.  
  300.                          EXITING.  When a menu is not open, pressing <Esc>
  301.                          will exit from CTSHELL.  So will <Alt-X>, and
  302.                          there's a menu entry that will work as well.  I
  303.                          just HATE it when I can't figure a way out of a
  304.                          program.
  305.  
  306.  
  307.  
  308.     CTSHELL MENUS        CURRENT FILE.  This menu contains the
  309.                          Point-'n'-Shoot entries for the current file.
  310.                          Selecting one applies that operation to the file
  311.                          that is currently highlighted.
  312.                               This menu always offers the built-in features
  313.                          of CTSHELL, such as changing file attributes,
  314.                          copying, deleting, moving, renaming, etc.  In
  315.                          addition, it will contain entries for all the
  316.                          Point-'n'-Shoot options you establish in your
  317.                          CTSHELL.CFG file.
  318.  
  319.                          TAGGED FILES.  The provided features are the same
  320.                          as for the current file, except for renaming.  In
  321.                          addition, this menu will list all the
  322.                          Point-'n'-Shoot options that you've specified will
  323.                          work with multiple files.
  324.  
  325.                          DIRECTORIES/TASKS.  From the section of the same
  326.                          name in your CTSHELL.CFG file, this is the menu
  327.                          that lets you move easily to the place where you
  328.                          want to work on a project, and start the program
  329.                          that you need when you get there.
  330.                               In the classroom, this is useful for listing
  331.                          the various lab projects.  At home, it's useful
  332.                          for transferring email, running an offline reader,
  333.                          starting a compiler environment, and much more.
  334.  
  335.                          PROGRAM.  This provides a DOS SHELL for those
  336.                          times when you really prefer to use the regular
  337.                          command line.  That will allow you to use the
  338.                          command repeat feature of your command processor,
  339.                          if it has such a feature.
  340.                               In addition, there are two options that will
  341.                          take you directly to your LIB directory and to
  342.                          your INCLUDE directory.  For these to work well,
  343.                          the environment variables that define these two
  344.                          must contain a single path each.
  345.                               There's an option to exit from CTSHELL in
  346.                          this menu.  Note that of no menu is open you can
  347.                          also exit with <Esc> or with <Alt-X>.
  348.  
  349.                          UTILITY.  CTSHELL offers a CHKDSK option (it uses
  350.                          the ordinary CHKDSK.COM from DOS) and it will
  351.                          format floppy disks a bit more conveniently than
  352.                          the regular DOS format.
  353.                               If you have DOS 3.0 or better, you can select
  354.                          a no-frills format (no prompt for volume name, no
  355.                          prompt for format again), or you can select a
  356.                          complete format option.  To format a single disk
  357.                          quickly, the first option is preferred.  To format
  358.                          a stack of disks, you'll want to select the second.
  359.                               To make it safer for classroom use, CTSHELL
  360.                          does not offer a direct menu selection for
  361.                          formatting hard drives.  However, there's nothing
  362.                          to prevent you from typing in a FORMAT C: command
  363.                          if you really want to.
  364.  
  365.  
  366.  
  367.     TO BE VERY           I realize that there are some additional functions
  368.     HONEST               that might make CTSHELL more useful.  My first
  369.                          design consideration was to produce the most
  370.                          utility from the smallest size program. CTSHELL is
  371.                          less than 50K, and swaps in such a way as to be
  372.                          the equivalent of about 5K.
  373.                               My second consideration was to make this a
  374.                          quick job.  I wanted something to take the place
  375.                          of the DOS 4.0 SHELL, not something to take the
  376.                          place of DesqView or Windows.  CTSHELL was written
  377.                          in a few days using Microsoft C6.0.  (A version
  378.                          was also compiled using Turbo C++, but that was
  379.                          always about 15% to 20% larger from the same
  380.                          source code.)
  381.                               When time permits, CTSHELL v2.0 will add
  382.                          command-line editing (a la CED and DOSEDIT).
  383.                          Synonyms (aliases) are not planned, as CTSHELL
  384.                          calls the default command processor.  Those using
  385.                          CED, DOSEDIT or 4DOS should find that their
  386.                          aliases are not affected adversely by CTSHELL.
  387.                               Suggestions from those of you who use CTSHELL
  388.                          for additional features you'd like to see would be
  389.                          appreciated.
  390.  
  391.  
  392.  
  393.     OWNERSHIP AND        CTSHELL and its accompanying documents are
  394.     COPYRIGHT            Copyright (C) 1990 Jerry Houston and Computer
  395.                          Training, All Rights Reserved.
  396.                               Those who agree to the terms and conditions
  397.                          stated below are welcome to use it for any
  398.                          personal purpose.
  399.  
  400.                          Note that Windows is a trademark of Microsoft
  401.                          Corporation, and Desqview is a trademark of
  402.                          Quarterdeck.
  403.  
  404.  
  405.  
  406.     TERMS AND            Neither the author nor Computer Training warrants
  407.     CONDITIONS           that CTSHELL will do anything, or that it won't do
  408.                          anything.  Users assume full responsibility for
  409.                          their use of, misuse of, abuse of, or inability to
  410.                          use, the program.
  411.                               You are free to use CTSHELL personally, and
  412.                          to pass it along to others, provided that you
  413.                          distribute an intact set of files containing:
  414.  
  415.                               CTSHELL.EXE  -  executable program file
  416.                               CTSHELL.CFG  -  example configuration file
  417.                               CTSHELL.DOC  -  this document
  418.  
  419.                          Anyone who is interested in using CTSHELL for any
  420.                          commercial purpose must first obtain written
  421.                          permission from the author.
  422.  
  423.  
  424.  
  425.     SPECIAL NOTE         ...is due to Marty Del Vecchio for his excellent
  426.     OF THANKS            swap() function.  Without it, CTSHELL would not
  427.                          have been available in this XMS/EMS swapping
  428.                          version this soon.
  429.                               Other C programmers who would like to add
  430.                          this capability to your programs can find it in
  431.                          the public domain and downloadable from many BBS
  432.                          systems.  The version used here was 3.0, and it
  433.                          was packaged as SWAP300.ZIP.
  434.  
  435.  
  436.  
  437.     VERSIONS             v1.00  Original concept, distribution stopped
  438.                                 almost at once to implement additional
  439.                                 features and do further testing.
  440.  
  441.                          v1.10  First real release, 10/14/90.
  442.  
  443.                          v1.11  minor bug-fix, 10/15/90.
  444.                                 ■ Linked directory list was not properly
  445.                                   freed, making it possible to run out of
  446.                                   room for it during a long session.
  447.                                 ■ Added display of remaining space in the
  448.                                   list.
  449.  
  450.                          v1.12  features added, 10/16/90.
  451.                                 ■ File copy was not preserving time and date.
  452.                                 ■ Now displays current disk free space.
  453.                                 ■ If mouse is clicked on function key label,
  454.                                   that function is invoked.
  455.                                 ■ Speeded up mouse processing.
  456.                                 ■ Extended mouse double-click interval from
  457.                                   6 clock ticks to 8.
  458.                                 ■ Modified file copy to allow specifying a
  459.                                   destination file OR directory instead of
  460.                                   just a destination directory--now works
  461.                                   just like DOS copy in that respect.
  462.                                 ■ Improved handling of extensions for
  463.                                   invoking Point-'n'-Shoot programs. Now
  464.                                   doesn't confuse .COM with .C and try to
  465.                                   edit it.
  466.                                 ■ Now uses Marty Del Vecchio's v3.0 of swap()
  467.                                   (previous versions used v2.01).
  468.  
  469.                          v1.13  features added, 10/18/90.
  470.                                 ■ Modified menu process routine for more
  471.                                   intuitive movement of cursor bar.
  472.                                 ■ Added <F5> to tag files by name.  Uses
  473.                                   standard DOS wildcard characters ? and *.
  474.                                 ■ Added <F6> to return to original home
  475.                                   directory if an application program
  476.                                   changes the current path.
  477.                                 ■ Added <F7> to load a configuration file.
  478.                                   Defaults to CTSHELL environment variable
  479.                                   path if a new path is not supplied.  Makes
  480.                                   it easier to modify the config file and
  481.                                   reload it quickly.
  482.  
  483.                          v1.14  minor bug-fix, 10/19/09.
  484.                                 ■ Fixed a minor bug that selected files with
  485.                                   no extensions when *.ext was specified as
  486.                                   a wildcard name.  Now selects files with no
  487.                                   extension only when *. is used.
  488.                                 ■ Wasn't updating screen after changing the
  489.                                   attributes of a bunch of tagged files.  Was
  490.                                   updating next time the screen was refreshed.
  491.  
  492.  
  493.     THE AUTHOR                             JERRY  HOUSTON
  494.                                               ──────
  495.                                          Computer  Training
  496.                                           7016 NE 137th ST
  497.                                         Kirkland, WA   98034
  498.  
  499.                          Jerry may be contacted on his Wildcat BBS system,
  500.                          called Programmer's Resource.  Phone numbers are
  501.                          (206) 823-2831 and 823-1917. ProgRes BBS relays
  502.                          selected conferences from the Intelec, SmartNet,
  503.                          and WestNet BBS networks.
  504.